auto merge of #537 : markberger/cargo/510-hg-flag, r=alexcrichton
authorbors <bors@rust-lang.org>
Mon, 15 Sep 2014 16:43:46 +0000 (16:43 +0000)
committerbors <bors@rust-lang.org>
Mon, 15 Sep 2014 16:43:46 +0000 (16:43 +0000)
Allows the client to initialize a mercurial repo when creating a new cargo project with `cargo new --hg`. This would close #510.

This is my first time writing code in rust outside of a toy program so please feel free to tear it apart or suggest an alternative solution.

1  2 
src/cargo/ops/cargo_new.rs

index 97b1a4ce8007c2d098151c3e8f2931de6ba3862b,edbb4c3f34f7cd71dec63d1935b97f5d51f4e44c..b43b735d5161123e534d544995a6094e3e346577
@@@ -1,10 -1,9 +1,10 @@@
  use std::os;
  use std::io::{mod, fs, File};
 +use std::io::fs::PathExtensions;
  
- use git2::{Repository, Config};
+ use git2::Config;
  
- use util::{CargoResult, human, ChainError, config, internal};
+ use util::{GitRepo, HgRepo, CargoResult, human, ChainError, config, internal};
  use core::shell::MultiShell;
  
  pub struct NewOptions<'a> {